﻿@using SCMS.Resource
@model SCMS.Model.FinanceLimit
@{AjaxOptions ajaxOpts = new AjaxOptions
  {
      UpdateTargetId = "tabs-11",
      LoadingElementId = "loading",
      HttpMethod = "Post",
      Url = Url.Action("SaveFinanceLimit"),
      OnSuccess = "CloseDialog"
  };}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{
    @Html.ValidationSummary(true)
    <table>
        <tbody>            
            <tr>
                <td align="right">@Resources.Approver_FinanceLimitForm_FinanceLimitName<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.Name)<br />
                    @Html.ValidationMessageFor(model => model.Name, Resources.Global_String_Required)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources.Approver_FinanceLimitForm_MaximumAmount (@ViewBag.Currency)<font color="red">*</font>:</td>
                <td>
                    @Html.TextBoxFor(model => model.Limit, new { @class = "numericTb", id = "flLimit" })<br />
                    @Html.ValidationMessageFor(model => model.Limit, Resources.Global_String_Required)
                </td>
            </tr>
            <tr>
                <td align="right">@Resources.Budget_CategoryList_Description:</td>
                <td>
                    @Html.TextAreaFor(model => model.Description)
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    @Html.HiddenFor(model => model.Id)
                    @Html.HiddenFor(model => model.CountryProgrammeId)
                    <input type="submit" value=" @Resources.Global_String_Save " class="btn green" />&nbsp;
                    <input type="button" value="@Resources.Global_String_Cancel" class="btn green" onclick="javascript:CloseDialog()" />
                </td>
            </tr>
         </tbody>
    </table>
}
